//package com.zzuli.ylsystem.config;
//
//import com.zzuli.ylsystem.quartz.UserDayAddJob;
//import org.quartz.JobDataMap;
//import org.quartz.JobDetail;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.scheduling.quartz.JobDetailFactoryBean;
//import org.springframework.scheduling.quartz.SimpleTriggerFactoryBean;
//
//// 配置 -> 数据库 -> 调用
//@Configuration
//public class QuartzConfig {
//
//    // FactoryBean可简化Bean的实例化过程:
//    // 1.通过FactoryBean封装Bean的实例化过程.
//    // 2.将FactoryBean装配到Spring容器里.
//    // 3.将FactoryBean注入给其他的Bean.
//    // 4.该Bean得到的是FactoryBean所管理的对象实例.
//
//    // 导出巡更人员今日到岗情况任务
//    @Bean
//    public JobDetailFactoryBean postScoreRefreshJobDetail() {
//        JobDetailFactoryBean factoryBean = new JobDetailFactoryBean();
//        factoryBean.setJobClass(UserDayAddJob.class);
//        factoryBean.setName("postScoreRefreshJob");
//        factoryBean.setGroup("communityJobGroup");
//        factoryBean.setDurability(true);
//        factoryBean.setRequestsRecovery(true);
//        return factoryBean;
//    }
//
//    @Bean
//    public SimpleTriggerFactoryBean postScoreRefreshTrigger(JobDetail postScoreRefreshJobDetail) {
//        SimpleTriggerFactoryBean factoryBean = new SimpleTriggerFactoryBean();
//        factoryBean.setJobDetail(postScoreRefreshJobDetail);
//        factoryBean.setName("postScoreRefreshTrigger");
//        factoryBean.setGroup("communityTriggerGroup");
//        factoryBean.setRepeatInterval(1000 * 60 * 5);
//        factoryBean.setJobDataMap(new JobDataMap());
//        return factoryBean;
//    }
//
//    // 导出巡更人员任务点漏查数量任务
//    @Bean
//    public JobDetailFactoryBean lcPointExportJobDetail() {
//        JobDetailFactoryBean factoryBean = new JobDetailFactoryBean();
//        factoryBean.setJobClass(LCPointExportJob.class);
//        factoryBean.setName("lcPointExportJob");
//        factoryBean.setGroup("lcPointExportJobGroup");
//        factoryBean.setDurability(true);
//        factoryBean.setRequestsRecovery(true);
//        return factoryBean;
//    }
//
//    @Bean
//    public SimpleTriggerFactoryBean lcPointExportTrigger(JobDetail lcPointExportJobDetail) {
//        SimpleTriggerFactoryBean factoryBean = new SimpleTriggerFactoryBean();
//        factoryBean.setJobDetail(lcPointExportJobDetail);
//        factoryBean.setName("lcPointExportTrigger");
//        factoryBean.setGroup("lcPointExportTriggerGroup");
//        factoryBean.setRepeatInterval(1000 * 60 * 5);
//        factoryBean.setJobDataMap(new JobDataMap());
//        return factoryBean;
//    }
//}
